package mypackage.servicce.Impl;

import mypackage.bean.Address;
import mypackage.bean.Clients;
import mypackage.bean.Goods;
import mypackage.bean.ReceiveOrder;
import mypackage.dao.HistoryOrderDao;
import mypackage.dao.impl.HistoryOrderDaoImpl;
import mypackage.servicce.HistoryOrderService;

import java.util.List;

/**
 * @author YH925
 * @create 2021/12/10 19:16
 */
public class HistoryOrderServiceImpl implements HistoryOrderService {
    private final HistoryOrderDao dao = new HistoryOrderDaoImpl();

    @Override
    public void insertOneData(String  goodsId, int clientId, int amount, double price,int addressId) {
        dao.insertOneData(goodsId,clientId,amount,price,addressId);
    }

    @Override
    public Boolean findOrderByClient(String goodsId, int clientId) {
        return dao.findOrderByClient(goodsId,clientId);
    }

    @Override
    public void insertDataFromChart(int clientId, int addressId) {
        dao.insertDataFromChart(clientId,addressId);
    }

    @Override
    public int findConsumeAmount(int clientId) {
        return dao.findConsumeAmount(clientId);
    }

    @Override
    public double findConsumeMoney(int clientId) {
        return dao.findConsumeMoney(clientId);
    }

    @Override
    public List<ReceiveOrder> findAllConsumeRecord(int clientId) {
        return dao.findAllConsumeRecord(clientId);
    }
}
